﻿using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace JTLeigh.Commerce.Spencer.Core.Business.UnitTests
{

    /// <summary>
    /// Unit tests for the <see cref="PaginationResult{T}"/> class.
    /// </summary>
    [TestClass]
    public class PaginationResultFixture
    {

        /// <summary>
        /// Ensures the constructor sets the properties correctly.
        /// </summary>
        [TestMethod]
        public void TestConstructor()
        {
            List<int> items;
            PaginationResult<int> result;

            items = new List<int>();
            result = new PaginationResult<int>(5, items, 10);
            Assert.AreEqual(5, result.CurrentPage);
            Assert.AreSame(items, result.ItemsOnCurrentPage);
            Assert.AreEqual(10, result.TotalPages);
        }

    }

}
